home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / include / Dt / SpinBox.h.z / SpinBox.h
Encoding:
C/C++ Source or Header  |  2003-11-18  |  8.2 KB  |  367 lines

  1. /*
  2.  * SpinBox.h
  3.  *
  4.  * Copyright 2000, Silicon Graphics, Inc.
  5.  * ALL RIGHTS RESERVED
  6.  * 
  7.  * UNPUBLISHED -- Rights reserved under the copyright laws of the United
  8.  * States.   Use of a copyright notice is precautionary only and does not
  9.  * imply publication or disclosure.
  10.  *
  11.  * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
  12.  * Use, duplication or disclosure by the Government is subject to restrictions
  13.  * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
  14.  * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
  15.  * in similar or successor clauses in the FAR, or the DOD or NASA FAR
  16.  * Supplement.  Contractor/manufacturer is Silicon Graphics, Inc.,
  17.  * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
  18.  *
  19.  * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
  20.  * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
  21.  * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
  22.  * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
  23.  * GRAPHICS, INC.
  24.  */
  25. /* $XConsortium: SpinBox.h /main/cde1_maint/1 1995/07/17 18:32:38 drk $ */
  26. /*
  27.  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
  28.  *  (c) Copyright 1993, 1994 International Business Machines Corp.
  29.  *  (c) Copyright 1993, 1994 Novell, Inc.
  30.  *  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  31.  */
  32. /***********************************************************
  33. Copyright 1993 Interleaf, Inc.
  34.  
  35. Permission to use, copy, modify, and distribute this software
  36. and its documentation for any purpose without fee is granted,
  37. provided that the above copyright notice appear in all copies
  38. and that both copyright notice and this permission notice appear
  39. in supporting documentation, and that the name of Interleaf not
  40. be used in advertising or publicly pertaining to distribution of
  41. the software without specific written prior permission.
  42.  
  43. Interleaf makes no representation about the suitability of this
  44. software for any purpose. It is provided "AS IS" without any
  45. express or implied warranty.
  46. ******************************************************************/
  47.  
  48. #ifndef _Dt_SpinBox_h
  49. #define _Dt_SpinBox_h
  50.  
  51. #include <Xm/Xm.h>
  52.  
  53. #ifdef __cplusplus
  54. extern "C" {
  55. #endif
  56.  
  57.  
  58. /*
  59.  * Constants
  60.  */
  61.  
  62. /* Resources */
  63.  
  64. #ifndef DtNarrowLayout
  65. #define DtNarrowLayout        "arrowLayout"
  66. #endif
  67. #ifndef DtNarrowSensitivity
  68. #define DtNarrowSensitivity    "arrowSensitivity"
  69. #endif
  70. #ifndef DtNarrowSize
  71. #define DtNarrowSize        "arrowSize"
  72. #endif
  73. #ifndef DtNspinBoxChildType
  74. #define DtNspinBoxChildType    "spinBoxChildType"
  75. #endif
  76. #ifndef DtNposition
  77. #define DtNposition        "position"
  78. #endif
  79. #ifndef DtNtextField
  80. #define DtNtextField        "textField"
  81. #endif
  82. #ifndef DtNwrap
  83. #define DtNwrap            "wrap"
  84. #endif
  85. #ifndef DtNincrementValue
  86. #define DtNincrementValue    "incrementValue"
  87. #endif
  88. #ifndef DtNmaximumValue
  89. #define DtNmaximumValue        "maximumValue"
  90. #endif
  91. #ifndef DtNminimumValue
  92. #define DtNminimumValue        "minimumValue"
  93. #endif
  94. #ifndef DtNnumValues
  95. #define DtNnumValues        "numValues"
  96. #endif
  97. #ifndef DtNvalues
  98. #define DtNvalues        "values"
  99. #endif
  100. #ifndef DtNactivateCallback
  101. #define DtNactivateCallback    XmNactivateCallback
  102. #endif
  103. #ifndef DtNalignment
  104. #define DtNalignment        XmNalignment
  105. #endif
  106. #ifndef DtNcolumns
  107. #define DtNcolumns        XmNcolumns
  108. #endif
  109. #ifndef DtNdecimalPoints
  110. #define DtNdecimalPoints    XmNdecimalPoints
  111. #endif
  112. #ifndef DtNeditable
  113. #define DtNeditable        XmNeditable
  114. #endif
  115. #ifndef DtNfocusCallback
  116. #define DtNfocusCallback    XmNfocusCallback
  117. #endif
  118. #ifndef DtNinitialDelay
  119. #define DtNinitialDelay        XmNinitialDelay
  120. #endif
  121. #ifndef DtNlosingFocusCallback
  122. #define DtNlosingFocusCallback    XmNlosingFocusCallback
  123. #endif
  124. #ifndef DtNmarginHeight
  125. #define DtNmarginHeight        XmNmarginHeight
  126. #endif
  127. #ifndef DtNmarginWidth
  128. #define DtNmarginWidth        XmNmarginWidth
  129. #endif
  130. #ifndef DtNmaxLength
  131. #define DtNmaxLength        XmNmaxLength
  132. #endif
  133. #ifndef DtNmodifyVerifyCallback
  134. #define DtNmodifyVerifyCallback    XmNmodifyVerifyCallback
  135. #endif
  136. #ifndef DtNrecomputeSize
  137. #define DtNrecomputeSize    XmNrecomputeSize
  138. #endif
  139. #ifndef DtNrepeatDelay
  140. #define DtNrepeatDelay        XmNrepeatDelay
  141. #endif
  142. #ifndef DtNvalueChangedCallback
  143. #define DtNvalueChangedCallback    XmNvalueChangedCallback
  144. #endif
  145.  
  146. #ifndef DtCArrowLayout
  147. #define DtCArrowLayout        "ArrowLayout"
  148. #endif
  149. #ifndef DtCArrowSensitivity
  150. #define DtCArrowSensitivity    "ArrowSensitivity"
  151. #endif
  152. #ifndef DtCSpinBoxChildType
  153. #define DtCSpinBoxChildType    "SpinBoxChildType"
  154. #endif
  155. #ifndef DtCTextField
  156. #define DtCTextField        "TextField"
  157. #endif
  158. #ifndef DtCWrap
  159. #define DtCWrap            "Wrap"
  160. #endif
  161. #ifndef DtCIncrementValue
  162. #define DtCIncrementValue    "incrementValue"
  163. #endif
  164. #ifndef DtCMaximumValue
  165. #define DtCMaximumValue        "maximumValue"
  166. #endif
  167. #ifndef DtCMinimumValue
  168. #define DtCMinimumValue        "minimumValue"
  169. #endif
  170. #ifndef DtCNumValues
  171. #define DtCNumValues        "numValues"
  172. #endif
  173. #ifndef DtCValues
  174. #define DtCValues        "values"
  175. #endif
  176. #ifndef DtCAlignment
  177. #define DtCAlignment        XmCAlignment
  178. #endif
  179. #ifndef DtCCallback
  180. #define DtCCallback        XmCCallback
  181. #endif
  182. #ifndef DtCColumns
  183. #define DtCColumns        XmCColumns
  184. #endif
  185. #ifndef DtCDecimalPoints
  186. #define DtCDecimalPoints    XmCDecimalPoints
  187. #endif
  188. #ifndef DtCEditable
  189. #define DtCEditable        XmCEditable
  190. #endif
  191. #ifndef DtCInitialDelay
  192. #define DtCInitialDelay        XmCInitialDelay
  193. #endif
  194. #ifndef DtCItems
  195. #define DtCItems        XmCItems
  196. #endif
  197. #ifndef DtCMarginHeight
  198. #define DtCMarginHeight        XmCMarginHeight
  199. #endif
  200. #ifndef DtCMarginWidth
  201. #define DtCMarginWidth        XmCMarginWidth
  202. #endif
  203. #ifndef DtCMaxLength
  204. #define DtCMaxLength        XmCMaxLength
  205. #endif
  206. #ifndef DtCPosition
  207. #define DtCPosition        XmCPosition
  208. #endif
  209. #ifndef DtCRecomputeSize
  210. #define DtCRecomputeSize    XmCRecomputeSize
  211. #endif
  212. #ifndef DtCRepeatDelay
  213. #define DtCRepeatDelay        XmCRepeatDelay
  214. #endif
  215.  
  216. /* Representation types */
  217.  
  218. #ifndef DtRIncrementValue
  219. #define DtRIncrementValue    "IncrementValue"
  220. #endif
  221. #ifndef DtRMaximumValue
  222. #define DtRMaximumValue        "MaximumValue"
  223. #endif
  224. #ifndef DtRMinimumValue
  225. #define DtRMinimumValue        "MinimumValue"
  226. #endif
  227. #ifndef DtRNumValues
  228. #define DtRNumValues        "NumValues"
  229. #endif
  230. #ifndef DtRValues
  231. #define DtRValues        "Values"
  232. #endif
  233. #ifndef DtRArrowSensitivity
  234. #define DtRArrowSensitivity    "ArrowSensitivity"
  235. #endif
  236. #ifndef DtRArrowLayout
  237. #define DtRArrowLayout        "ArrowLayout"
  238. #endif
  239. #ifndef DtRSpinBoxChildType
  240. #define DtRSpinBoxChildType    "SpinBoxChildType"
  241. #endif
  242.  
  243. /* DtNarrowLayout values */
  244.  
  245. #ifndef DtARROWS_FLAT_BEGINNING
  246. #define DtARROWS_FLAT_BEGINNING        4
  247. #endif
  248. #ifndef DtARROWS_FLAT_END
  249. #define DtARROWS_FLAT_END        3
  250. #endif
  251. #ifndef DtARROWS_SPLIT
  252. #define DtARROWS_SPLIT            2
  253. #endif
  254. #ifndef DtARROWS_BEGINNING
  255. #define DtARROWS_BEGINNING        1
  256. #endif
  257. #ifndef DtARROWS_END
  258. #define DtARROWS_END            0
  259. #endif
  260.  
  261. /* DtNarrowSensitivity values */
  262.  
  263. #ifndef DtARROWS_SENSITIVE
  264. #define DtARROWS_SENSITIVE        3
  265. #endif
  266. #ifndef DtARROWS_DECREMENT_SENSITIVE
  267. #define DtARROWS_DECREMENT_SENSITIVE    2
  268. #endif
  269. #ifndef DtARROWS_INCREMENT_SENSITIVE
  270. #define DtARROWS_INCREMENT_SENSITIVE    1
  271. #endif
  272. #ifndef DtARROWS_INSENSITIVE
  273. #define DtARROWS_INSENSITIVE        0
  274. #endif
  275.  
  276. /* DtNspinBoxChildType values */
  277.  
  278. #ifndef DtNUMERIC
  279. #define DtNUMERIC    3
  280. #endif
  281.  
  282. #ifndef DtSTRING
  283. #define DtSTRING    XmSTRING
  284. #endif
  285.  
  286. /* DtNalignment values */
  287.  
  288. #ifndef DtALIGNMENT_BEGINNING
  289. #define DtALIGNMENT_BEGINNING    XmALIGNMENT_BEGINNING
  290. #endif
  291. #ifndef DtALIGNMENT_CENTER
  292. #define DtALIGNMENT_CENTER    XmALIGNMENT_CENTER
  293. #endif
  294. #ifndef DtALIGNMENT_END
  295. #define DtALIGNMENT_END        XmALIGNMENT_END
  296. #endif
  297.  
  298. /* Callback reasons */
  299.  
  300. #ifndef DtCR_OK
  301. #define DtCR_OK            XmCR_OK
  302. #endif
  303. #ifndef DtCR_SPIN_NEXT
  304. #define DtCR_SPIN_NEXT        62
  305. #endif
  306. #ifndef DtCR_SPIN_PRIOR
  307. #define DtCR_SPIN_PRIOR        63
  308. #endif
  309.  
  310.  
  311. /*
  312.  * Types
  313.  */
  314.  
  315. typedef struct {
  316.     int        reason;
  317.     XEvent        *event;
  318.     Widget        widget;
  319.     Boolean        doit;
  320.     int        position;
  321.     XmString    value;
  322.     Boolean        crossed_boundary;
  323. } DtSpinBoxCallbackStruct;
  324.  
  325. /* Widget class and instance */
  326.  
  327. typedef struct _DtSpinBoxClassRec *DtSpinBoxWidgetClass;
  328. typedef struct _DtSpinBoxRec      *DtSpinBoxWidget;
  329.  
  330. /*
  331.  * Data
  332.  */
  333.  
  334. /* Widget class record */
  335.  
  336. externalref WidgetClass dtSpinBoxWidgetClass;
  337.  
  338.  
  339. /*
  340.  * Functions
  341.  */
  342.  
  343. extern Widget DtCreateSpinBox(
  344.         Widget        parent,
  345.         char        *name,
  346.         ArgList        arglist,
  347.         Cardinal    argcount);
  348.  
  349. extern void DtSpinBoxAddItem(
  350.         Widget        widget,
  351.         XmString    item,
  352.         int        pos);
  353.  
  354. extern void DtSpinBoxDeletePos(
  355.         Widget        widget,
  356.         int        pos);
  357.  
  358. extern void DtSpinBoxSetItem(
  359.         Widget        widget,
  360.         XmString    item);
  361.  
  362. #ifdef __cplusplus
  363. }
  364. #endif
  365.  
  366. #endif    /* _Dt_SpinBox_h */
  367.